package AbstractTransactions

import "PaySalary/Model"

type ClassificationTransaction interface {
	GetClassification() Model.PaymentClassification
	GetSchedule() Model.PaymentSchedule
}

type ChangeClassificationTransaction struct {
	ClassificationTransaction
	ChangeEmployeeTransaction
}

func (c *ChangeClassificationTransaction) NewChangeClassificationTransaction(empid int) {
	c.NewChangeEmployeeTransaction(empid)
}

func (c * ChangeClassificationTransaction)Change(e Model.Employee)  {
	pc := c.GetClassification()
	e.SetItsClassification(pc)

	ps := c.GetSchedule()
	e.SetItsSchedule(ps)
}